<?php

defined('G_IN_SYSTEM')or exit('No permission resources.');
System::load_app_class('base','mobileapi','no');
class goods extends SystemAction {
	private $db;
	public function __construct(){
		$this->db=System::load_sys_class('model');
	}
	   //商品分类
    public function shopclass(){
        
        $category = $this->db->GetList("select *  from `@#_category` where `model`= '1' AND `parentid`='0' ");
        
         $info=array("category"=>$category);
        $this->success($info)；
    } 

	public function init(){

	}
	
	
	/*所有参与记录
	sid,p
	*/
	public function go_record_ifram(){

		$gid = $_POST['sid'];
		$page=System::load_sys_class('page');		
		$total=$this->db->GetCount("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '$gid'");

		if(isset($_POST['p'])){
			$pagenum=(int)$_POST['p'];
		}else{
			$pagenum=1;
		}
		$num=10;
		$page->config($total,$num,$pagenum,"0");
		$go_record_list=$this->db->GetPage("SELECT * FROM `@#_member_go_record` WHERE `shopid` = '$gid' order by id DESC",array("num"=>$num,"page"=>$pagenum,"type"=>1,"cache"=>0));	
		
		
	}
	
	
}/*类结束*/